package com.zhou.controller;

import com.zhou.pojo.User;
import com.zhou.server.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @CiassName DemoController
 * @Description TODO
 * @Author ZhouFeiHong
 * @Date 2021/9/520:41
 * @Version 1.o
 **/
@RestController()
@RequestMapping("demo")
public class DemoController {
    @Autowired
    private DemoService demoService;

    @RequestMapping("jdbc")
    public Map getJDBCMsg() {
        System.out.println("1 = " + 1);
        return demoService.getMag();
    }

    @RequestMapping("jpa")
    public List<User> getJpaMsg() {
        return demoService.getJpaMag();
    }
}
